import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '公司编号',
    align:"center",
    dataIndex: 'companyNumber'
   },
   {
    title: '设备名称',
    align:"center",
    dataIndex: 'equipmentName'
   },
   {
    title: '注意事项',
    align:"center",
    dataIndex: 'careContent'
   },
   {
    title: '设备位置',
    align:"center",
    dataIndex: 'address'
   },
   {
    title: '设备说明书',
    align:"center",
    dataIndex: 'equipmentInstructions',
   },
   {
    title: '备注',
    align:"center",
    dataIndex: 'remark'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
	{
      label: "公司编号",
      field: 'companyNumber',
      component: 'Input',
      //colProps: {span: 6},
 	},
	{
      label: "设备名称",
      field: 'equipmentName',
      component: 'Input',
      //colProps: {span: 6},
 	},
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '公司编号',
    field: 'companyNumber',
    component: 'Input',
  },
  {
    label: '设备名称',
    field: 'equipmentName',
    component: 'Input',
  },
  {
    label: '注意事项',
    field: 'careContent',
    component: 'Input',
  },
  {
    label: '设备位置',
    field: 'address',
    component: 'Input',
  },
  {
    label: '设备说明书',
    field: 'equipmentInstructions',
    component: 'JUpload',
    componentProps:{
     },
  },
  {
    label: '备注',
    field: 'remark',
    component: 'InputTextArea',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];

// 高级查询数据
export const superQuerySchema = {
  companyNumber: {title: '公司编号',order: 0,view: 'text', type: 'string',},
  equipmentName: {title: '设备名称',order: 1,view: 'text', type: 'string',},
  careContent: {title: '注意事项',order: 2,view: 'text', type: 'string',},
  address: {title: '设备位置',order: 3,view: 'text', type: 'string',},
  equipmentInstructions: {title: '设备说明书',order: 4,view: 'file', type: 'string',},
  remark: {title: '备注',order: 5,view: 'textarea', type: 'string',},
};

/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}
